package com.itheima.day10_WZRY;

public class hero  {

    private String name;
    private int hp;
    private int attack;
    private int result;
    private double noviceFitness;

    public hero() {
    }

    public hero(String name, int hp, int attack, int result) {
        this.attack = attack;
        this.hp = hp;
        this.name = name;
        this.result = result;
        this.noviceFitness = hp * 0.5 + attack * 0.2 + result * 0.3;
    }

    public int getAttack() {
        return attack;
    }

    public void setAttack(int attack) {
        this.attack = attack;
    }

    public int getHp() {
        return hp;
    }

    public void setHp(int hp) {
        this.hp = hp;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getResult() {
        return result;
    }

    public void setResult(int result) {
        this.result = result;
    }

    public double getNoviceFitness() {
        return noviceFitness;
    }

    public void setNoviceFitness(double noviceFitness) {
        this.noviceFitness = noviceFitness;
    }

    @Override
    public String toString() {
        return name + ',' + hp + ',' + attack + ',' + result + ',' + noviceFitness;
    }
}
